﻿<Window x:Class="CSSAdriverapp.DriverInfo"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="Driver Info" Height="455" Width="585" xmlns:my="clr-namespace:CSSAdriverapp" Icon="/CSSA%20Driver%20App;component/lorry_green_256.ico">
    <Grid Background="#C5AFB1AF">
        <DataGrid AutoGenerateColumns="False" Height="352" HorizontalAlignment="Left" Margin="21,25,0,0" Name="dataGrid1" VerticalAlignment="Top" Width="171" DataContext="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType=my:DriverInfo, AncestorLevel=1}, Path=drivers}" ItemsSource="{Binding Path=drivers, RelativeSource={RelativeSource FindAncestor, AncestorType=my:DriverInfo, AncestorLevel=1}}" SelectionChanged="dataGrid1_SelectionChanged"  AlternatingRowBackground="#FF96D2FF" SelectionMode="Single" IsReadOnly="True" CanUserAddRows="false" GridLinesVisibility="None">
            <DataGrid.Columns>
                <DataGridTextColumn Binding="{Binding Path=last_name}" Header="Last Name" />
                <DataGridTextColumn Binding="{Binding Path=first_name}" Header="First Name" />
            </DataGrid.Columns>
        </DataGrid>
        <Label Content="Email" HorizontalAlignment="Left" Margin="218,25,0,367" Name="label1" Width="171" />
        <Label Content="Phone" Height="28" HorizontalAlignment="Left" Margin="218,46,0,0" Name="label2" VerticalAlignment="Top" Width="171" />
        <DataGrid AutoGenerateColumns="False" Height="108" HorizontalAlignment="Left" Margin="199,104,0,0" Name="dataGrid2" VerticalAlignment="Top" Width="347" DataContext="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType=my:DriverInfo, AncestorLevel=1}, Path=activities}"   AlternatingRowBackground="#FF96D2FF" SelectionMode="Single" IsReadOnly="True" CanUserAddRows="false" GridLinesVisibility="None">
            <DataGrid.Columns>
                <DataGridTextColumn Binding="{Binding Path=activity_name}" Header="Name" />
            </DataGrid.Columns>
        </DataGrid>
        <Label Content="Activities" Height="28" HorizontalAlignment="Left" Margin="199,80,0,0" Name="label3" VerticalAlignment="Top" />
        <DataGrid AutoGenerateColumns="False" Height="133" HorizontalAlignment="Left" Margin="199,244,0,0" Name="dataGrid3" VerticalAlignment="Top" Width="225" DataContext="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType=my:DriverInfo, AncestorLevel=1}, Path=availabilities}"  AlternatingRowBackground="#FF96D2FF" SelectionMode="Single" IsReadOnly="True" CanUserAddRows="false" GridLinesVisibility="None" >
            <DataGrid.Columns>
                <DataGridTextColumn Binding="{Binding Path=day}" Header="Day" />
                <DataGridTextColumn Binding="{Binding Path=startTime, StringFormat={}{0: hh:mm tt}}" Header="Start" />
                <DataGridTextColumn Binding="{Binding Path=endTime, StringFormat={}{0: hh:mm tt}}" Header="End" />

            </DataGrid.Columns>
        </DataGrid>
        <Label Content="Availability" Height="28" HorizontalAlignment="Left" Margin="197,218,0,0" Name="label4" VerticalAlignment="Top" />
    </Grid>
</Window>
